home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
COMPUTER
/
H254.ZIP
/
IRITSM3S.ZIP
/
CAGD_LIB
/
CAGD_MAT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-05-19
|
947b
|
22 lines
/******************************************************************************
* Cagd_mat.c - General matrix routines used by all modules of CAGD_lib. *
*******************************************************************************
* Written by Gershon Elber, Mar. 90. *
******************************************************************************/
#include "cagd_loc.h"
/******************************************************************************
* Vector - Matrix multiplication. It is assumed SrcVec != DstVec and both are *
* in homogeneous coordinates (i.e. vectore of length four). *
******************************************************************************/
void CagdMultMatVec(CagdMatStruct *Mat, CagdRType *SrcVec, CagdRType *DstVec)
{
int i, j;
for (i = 0; i < 4; i++) {
DstVec[i] = 0;
for (j = 0; j < 4; j++) DstVec[i] += Mat -> Mat[j][i] * SrcVec[j];
}
}